<div class="tableform">
      <table cellspacing="0" cellpadding="0" border="0" class="gridlist">
        <tr>
              <th>供应商</th>
              <th>AX供应商</th>
              <th>客户</th>
              <th>客户名称</th>
              <th>结算方式</th>
              <th>料号</th>
              <th>料品</th>
              <th>单位</th>
              <th>销售数量</th>
              <th>销售金额</th>
              <th>应付运费</th>
              <th>服务费</th>
        </tr>
    <{assign var="key" value="0"}>
    <{assign var="sumqty" value="0"}>
    <{assign var="summny" value="0"}>
    <{assign var="sumactual" value="0"}>
    <{assign var="sumfee" value="0"}>
      <{foreach from=$res item=his}>
      <{assign var="key" value=$key+1 }>
      <{assign var="sumqty" value=$sumqty+$his.saleqty }>
      <{assign var="summny" value=$summny+$his.salemny }>
      <{assign var="sumactual" value=$sumactual+$his.delivery_cost_actual }>
      <{assign var="sumfee" value=$sumfee+$his.servicefee }>
      <tbody>
        <tr>
          <td><{$his.AXsupplierCode}></td>
          <td><{$his.AXsupplierName}></td>
          <td><{$his.AXCustomer}></td>
          <td><{$his.customername}></td>
          <td><{$his.JSType}></td>
          <td><{$his.bn}></td>
          <td><{$his.product_name}></td>
          <td><{$his.unit}></td>
          <td><{$his.saleqty}></td>
          <td><{$his.salemny}></td>
          <td><{$his.delivery_cost_actual}></td>
          <td><{$his.servicefee}></td>
        </tr>
        </tbody>
      <{/foreach}>
        <tr>
          <td>总数：</td>
          <td colspan="6"><{$key}></td>
          <td><{$sumqty}></td>
          <td><{$summny}></td>
          <td><{$sumactual}></td>
          <td><{$sumfee}></td>
        </tr>
      </table>
</div>